home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 6.0 KB | 241 lines | [TEXT/MPS ] |
- ;
- ; File: PCIKernel.a
- ;
- ; Contains: All definitions, prototypes, and constants for the PCI Family.
- ;
- ; Version: Technology: xxx put the technology version here xxx
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__PCIKERNEL__') = 'UNDEFINED' THEN
- __PCIKERNEL__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__SYNCHRONIZATION__') = 'UNDEFINED' THEN
- include 'Synchronization.a'
- ENDIF
- IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
- include 'NameRegistry.a'
- ENDIF
- IF &TYPE('__INTERRUPTS__') = 'UNDEFINED' THEN
- include 'Interrupts.a'
- ENDIF
- IF &TYPE('__IOITERATOR__') = 'UNDEFINED' THEN
- include 'IOIterator.a'
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- ; typedef LogicalAddress PCIConfigAddress
-
- ; typedef LogicalAddress PCIIOAddress
-
- ;
- ; extern OSStatus PCIConfigReadByte(RegEntryRef *entry, PCIConfigAddress configAddr, UInt8 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigReadByte
- ENDIF
-
- ;
- ; extern OSStatus PCIConfigReadWord(RegEntryRef *entry, PCIConfigAddress configAddr, UInt16 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigReadWord
- ENDIF
-
- ;
- ; extern OSStatus PCIConfigReadLong(RegEntryRef *entry, PCIConfigAddress configAddr, UInt32 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigReadLong
- ENDIF
-
- ;
- ; extern OSStatus PCIConfigWriteByte(RegEntryRef *entry, PCIConfigAddress configAddr, UInt8 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigWriteByte
- ENDIF
-
- ;
- ; extern OSStatus PCIConfigWriteWord(RegEntryRef *entry, PCIConfigAddress configAddr, UInt16 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigWriteWord
- ENDIF
-
- ;
- ; extern OSStatus PCIConfigWriteLong(RegEntryRef *entry, PCIConfigAddress configAddr, UInt32 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigWriteLong
- ENDIF
-
- ;
- ; extern OSStatus PCIIOReadByte(RegEntryRef *entry, PCIIOAddress ioAddr, UInt8 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOReadByte
- ENDIF
-
- ;
- ; extern OSStatus PCIIOReadWord(RegEntryRef *entry, PCIIOAddress ioAddr, UInt16 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOReadWord
- ENDIF
-
- ;
- ; extern OSStatus PCIIOReadLong(RegEntryRef *entry, PCIIOAddress ioAddr, UInt32 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOReadLong
- ENDIF
-
- ;
- ; extern OSStatus PCIIOWriteByte(RegEntryRef *entry, PCIIOAddress ioAddr, UInt8 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOWriteByte
- ENDIF
-
- ;
- ; extern OSStatus PCIIOWriteWord(RegEntryRef *entry, PCIIOAddress ioAddr, UInt16 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOWriteWord
- ENDIF
-
- ;
- ; extern OSStatus PCIIOWriteLong(RegEntryRef *entry, PCIIOAddress ioAddr, UInt32 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIOWriteLong
- ENDIF
-
- ;
- ; extern OSStatus PCIIntAckReadByte(RegEntryRef *entry, UInt8 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIntAckReadByte
- ENDIF
-
- ;
- ; extern OSStatus PCIIntAckReadWord(RegEntryRef *entry, UInt16 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIntAckReadWord
- ENDIF
-
- ;
- ; extern OSStatus PCIIntAckReadLong(RegEntryRef *entry, UInt32 *value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIIntAckReadLong
- ENDIF
-
- ;
- ; extern OSStatus PCISpecialCycleWriteLong(RegEntryRef *entry, UInt32 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCISpecialCycleWriteLong
- ENDIF
-
- ;
- ; extern OSStatus PCISpecialCycleBroadcastLong(UInt32 value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCISpecialCycleBroadcastLong
- ENDIF
-
- ; IOIteration model definitions for the PCI Family
- PCIIOIteratorData RECORD 0
- IOCI ds IOCommonInfo ; offset: $0 (0)
- Name ds.b 32 ; offset: $14 (20)
- Domain ds.l 1 ; offset: $34 (52)
- BusNumber ds.l 1 ; offset: $38 (56)
- ConfigAddress ds.l 1 ; offset: $3C (60)
- sizeof EQU * ; size: $40 (64)
- ENDR
- ; get all pci device found
- ;
- ; extern OSStatus PCIGetDeviceData(ItemCount requestItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIGetDeviceData
- ENDIF
-
- ; get all pci device by a certain name
- ;
- ; extern OSStatus PCINameGetDeviceData(char *Name, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCINameGetDeviceData
- ENDIF
-
- ; get all pci device belonging to a certain domain
- ;
- ; extern OSStatus PCIDomainGetDeviceData(UInt32 Domain, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIDomainGetDeviceData
- ENDIF
-
- ; get all pci devices belonging to a certain bus
- ;
- ; extern OSStatus PCIBusNumberGetDeviceData(UInt32 BusNumber, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIBusNumberGetDeviceData
- ENDIF
-
- ; get a pci devices by its config address
- ;
- ; extern OSStatus PCIConfigAddressGetDeviceData(PCIConfigAddress ConfigAddress, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIConfigAddressGetDeviceData
- ENDIF
-
- ; bridge interrupt handler call
- ;
- ; extern OSStatus PCILookupParentMember(InterruptSetID theSet, InterruptSetMember *theParentSetMember)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _PCILookupParentMember
- moveq #11,D0
- dc.w $AAF4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PCILookupParentMember
- ENDIF
-
- ; plugin access to interrupt disable calls
- ;
- ; extern InterruptState PCIDisableInterrupts(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIDisableInterrupts
- ENDIF
-
- ;
- ; extern void PCIRestoreInterrupts(InterruptState theState)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PCIRestoreInterrupts
- ENDIF
-
- ENDIF
- ENDIF ; __PCIKERNEL__
-
-